﻿using ChipPaster.Common;
using ChipPaster.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ChipPaster.DataAccess
{
    public class StatisticsDataAccess : DataAccessBase<Statistics>
    {
        public static SqlStrings OperationSql = new SqlStrings
        {
            TableName = "Statistics",
            Add = @"INSERT INTO Statistics (ProductionLineID,MachineNum,SensorModel,SensorOrder,Quality,ProductedTime) " +
                  "VALUES (@ProductionLineID, @MachineNum,@SensorModel,@SensorOrder,@Quality,@ProductedTime)",
            QueryAll = @"SELECT * FROM Statistics",
            QueryOne = @"SELECT * FROM User WHERE Id = @Id",
            QueryByPage = @"SELECT * FROM Statistics WHERE ProductedTime >= @HeadTime AND ProductedTime <= @TailTime AND " +
                "SensorModel = @SensorModel"
        };
    }
}
